<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<?php $this->load->view(TPL_FOLDER."header");?>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" >
  <tr>
    <td width="3%" align="left" ><img src="{tpl_path}images/forward.jpg" /></td>
    <td width="97%" align="left" >您现在的位置：<a href="<?php echo site_url(CTL_FOLDER."news");?>">文章列表</a> &gt; <a href="<?php echo site_url(CTL_FOLDER."news_catalog");?>">分类列表</a> &gt; 分类修改</td>
  </tr>
</table>
<div id="TabAdd" style="display:none">
    <ul>
      <li><a href="#TabAdd-1"><span>基本信息</span></a></li>
      <li><a href="#TabAdd-2"><span>分类描述</span></a></li>
    </ul>
    <form action="<?php echo site_url(CTL_FOLDER."news_catalog/save_record");?>" method="post" enctype="multipart/form-data" name="dialog_edit_form" id="dialog_edit_form" onsubmit="return Validator.Validate(this,3)">
      <div id="TabAdd-1">
        <table width="100%"  border="0" cellpadding="3" cellspacing="0" >
       	  <tr>
            <td width="146"><font color="#FF0000">*</font>所属分类：</td>
            <td width="849">
            <select name="parent_id" id="parent_id">
            <option value="0">==根目录==</option>
            <?php 
			foreach($catalog_list as $row) {
				if($row->id!=$edit_data['id'])
				{
			?> 
            <option value="<?php echo $row->id;?>" <?php if($edit_data['parent_id']==$row->id) echo "selected";?>><?php echo str_repeat("&nbsp;&nbsp;",$row->deep_id).$row->cat_name;?></option>
            <?php
			 	}
			}?>
            </select></td>
          </tr>
          <tr>
            <td width="146"><font color="#FF0000">*</font>分类标题：</td>
            <td width="849"><input Name="cat_name" type="text" Id="cat_name" size="30" value="<?php echo $edit_data['cat_name'];?>" dataType="Require" msg="该项必须填写">            </td>
          </tr>
          <tr>
            <td><font color="#FF0000">*</font>分类排序：</td>
            <td><input name="seqorder" type="text" id="seqorder" size="4" value="<?php echo $edit_data['seqorder'];?>"  datatype="Integer" msg="该项必须填写数字" />
            </td>
          </tr>
          <tr>
            <td>上传图片：</td>
            <td><img src="{tpl_path}images/loading.gif" rel="{root_path}<?php echo $edit_data['pic_path'];?>" border="0" class="jq_pic_loading" /><br />
            <input type="text" value="<?php echo $edit_data['pic_path'];?>" name="pic_path" id="pic_path" size="25" /> <input name="pic" type="file" id="pic" size="15" dataType="Filter" accept="<?php echo str_replace("|",",",UP_IMAGES_EXT);?>" require="false" msg="文件格式必须是：<?php echo UP_IMAGES_EXT;?>" title="上传的文件格式必须是：<?php echo UP_IMAGES_EXT;?>,且单个文件不能超过 <?php echo ini_get("upload_max_filesize");?>">  <input type="button" name="sfbtn" class="button-style2" onclick="GetFileDialog('pic_path')" value="选择文件" /></td>
          </tr>
        </table>
      </div>
      <div id="TabAdd-2">
        <?php echo $content->create();?>
      </div>
      <input name="rd_id" type="hidden" value="<?php echo $edit_data['id'];?>" />
      <input name="old_parent_id" type="hidden" value="<?php echo $edit_data['parent_id'];?>" />
      <input name="is_has_chd" type="hidden" value="<?php echo $edit_data['is_has_chd'];?>" />
      <input type="submit" style=" margin-left:160px; margin-bottom:10px; margin-top:10px" name="sbmit" value="修改" class="button-style2" />
    </form>
  </div>
<script language="javascript">
$(document).ready(function(){
	$("#TabAdd").tabs();
	$("#TabAdd").show();
}); 
</script>
<?php $this->load->view(TPL_FOLDER."footer");?>